 
 #if !defined (CONFIG_H)
 #define CONFIG_H
 #include "Common.h"
 

namespace Apo
{
 
 struct ConfigSetting
 {
 	String AsString;
 	bool AsBool;
 	int AsInt;
 	float AsFloat;
 };
 
 typedef HashMap<uint32, ConfigSetting> ConfigBlock;
 
 class SERVER_DECL ConfigFile
 {
 public:
 	ConfigFile();
 	~ConfigFile();
 
 	bool SetSource(const char *file, bool ignorecase = true);
 	ConfigSetting * GetSetting(const char * Block, const char * Setting);
 
 	bool GetString(const char * block, const char* name, String *value);
 	String GetStringDefault(const char * block, const char* name, const char* def);
 	String GetStringVA(const char * block, const char* def, const char * name, ...);
 	bool GetString(const char * block, char * buffer, const char * name, const char * def, uint32 len);
 
 	bool GetBool(const char * block, const char* name, bool *value);
 	bool GetBoolDefault(const char * block, const char* name, const bool def);
 
 	bool GetInt(const char * block, const char* name, int *value);
 	int GetIntDefault(const char * block, const char* name, const int def);
 	int GetIntVA(const char * block, int def, const char* name, ...);
 
 	bool GetFloat(const char * block, const char* name, float *value);
 	float GetFloatDefault(const char * block, const char* name, const float def);
 	float GetFloatVA(const char * block, float def, const char* name, ...);
 
 private:
 	HashMap<uint32, ConfigBlock> m_settings;
 };
 
 
 class SERVER_DECL ConfigMgr
 {
 	// Mainly used for WS, others will probably only have one.
 public:
 	ConfigFile MainConfig;
 	ConfigFile RealmConfig;
 	ConfigFile ClusterConfig;
 };
 
 //static ConfigMgr Config;
}
 #endif
